package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.OrderStatusEnum;
import com.sc.nft.enums.PayMethodEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel("订单详情")
public class NewSecondCollectionOrderDetailsVO {

    @ApiModelProperty("1级标题")
    private String firstTitle;

    @ApiModelProperty("编号")
    private String serialNumber;

    @ApiModelProperty("缩略图")
    private String creationContent;

    @ApiModelProperty("等级名称")
    private String levelName;

    @ApiModelProperty("售出价格")
    private String buyPrice;

    @ApiModelProperty("防囤罚没金额")
    private String antiHoardPrice;

    @ApiModelProperty("到账金额")
    private String realAmount;

    @ApiModelProperty("手续费")
    private String charge;

    @ApiModelProperty("订单编号")
    private String orderNo;

    @ApiModelProperty("时间")
    private String createTime;
    @ApiModelProperty("完成时间")
    private String dealTime;

    @ApiModelProperty("售出人名字")
    private String salesUserName;

    @ApiModelProperty("购买人名字")
    private String buyUserName;

    @ApiModelProperty("订单编号")
    private String orderId;

    @ApiModelProperty("订单状态")
    private OrderStatusEnum status;

    @ApiModelProperty("系统当前时间")
    private String nowDate;

    @ApiModelProperty("过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expirationTime;

    @ApiModelProperty("gas上链费")
    private String gas;

    @ApiModelProperty("支付方式")
    private PayMethodEnum payType;

    @ApiModelProperty("收款方式")
    private PayMethodEnum receiveType;

    @ApiModelProperty("支付方式图标")
    private String payIcon;

    @ApiModelProperty("收款方式图标")
    private String receiveIcon;

    public void setRealAmount(BigDecimal realAmount) {
        this.realAmount = realAmount.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setAntiHoardPrice(BigDecimal antiHoardPrice) {
        this.antiHoardPrice = antiHoardPrice.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setBuyPrice(BigDecimal buyPrice) {
        this.buyPrice = buyPrice.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setGas(BigDecimal gas) {
        this.gas = gas.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }
    public void setCharge(BigDecimal charge) {
        this.charge = charge.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

}
